package com.hhf.rpc.core.fault.loadbalancer;

import com.hhf.rpc.core.fault.loadbalancer.impl.RoundRobinLoadBalancer;
import com.hhf.rpc.core.spi.SpiLoader;

/**
 * @Author hhf
 * @Date 2024/10/20
 * @Description
 */
public class LoadBalancerFactory {


    private static final LoadBalancer DEFAULT_LOADBALANCER = new RoundRobinLoadBalancer();

    /**
     * 从map获取实例
     */
    public static LoadBalancer getInstance(String key){
        return SpiLoader.getInstance(LoadBalancer.class,key);
    }
}
